<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<script src="./lib/echarts.min.js"></script>
	</head>
	<body>
		<div style="width: 600px; height: 400px"></div>

		<script type="text/javascript">
			let mCharts = echarts.init(document.querySelector('div'));
			let xData=['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
			// let yData=[3000,2800,900,1000,2200,4500,5000,3400,3000,2300,4500,5000]
			let yData=[3000,3006,3008,3010,3009,3006,3003,3001,3004,3006,3009,3007]
			let option = {
				title:{
					text:'2020年康师傅方便面年销售量表',
					textStyle:{
						color:'green'
					}
				},
				xAxis: {
					type: 'category', 
					data: xData,
					boundaryGap:false
				},
				yAxis: {
					type: 'value', 
					scale:true //绽放：脱离 0 值比例
				},
				series: [
					{
						name: '销量',
						type: 'line', 
						data: yData,
					},
				],
			};
			mCharts.setOption(option);
		</script>
	</body>
</html>
